package com.lmm.lcuser.lc_user.plugins;


import com.facebook.react.bridge.Callback;
import com.lmm.dresswisdom.lmmframe.reactnative.BasePlugin;
import com.lmm.dresswisdom.lmmframe.reactnative.annotation.RNPlugin;
import com.lmm.lcuser.lc_user.MainActivity;

import java.util.Map;

/**
 * Created by xmgong on 2017/12/5.
 */
@RNPlugin(method = "chooseMapLocation")
public class ChooseMapLocationPlugin extends BasePlugin<MainActivity> {
    public ChooseMapLocationPlugin(MainActivity act) {
        super(act);
    }

    @Override
    protected void doAction(Map<String, Object> map, Callback callback) {
        double lat = 0, lon = 0;
        if (map.containsKey("lat")) {
            lat = Double.parseDouble(map.get("lat").toString());
        }
        if (map.containsKey("lon")) {
            lon = Double.parseDouble(map.get("lon").toString());
        }
//        ARouter.getInstance().build("/app/chooseplace")
//                .withDouble("lat", lat)
//                .withDouble("lon", lon)
//                .navigation(activity, ReqCodeValue.ChoosePointReqCode);
    }
}
